using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace KeyCore.Domain.Model
{
    public class TelefonTyp
    {
        public TelefonTyp()
        {
            Telefon = new HashSet<Telefon>();
        }

        public int TelefonTypId { get; set; }

        public string TelefonTypNazwa { get; set; }

        public virtual ICollection<Telefon> Telefon { get; set; }    
    }

    public class TelefonTypConfiguration : EntityTypeConfiguration<TelefonTyp>
    {
        public TelefonTypConfiguration()
        {
            HasKey(k => k.TelefonTypId)
                .Property(p => p.TelefonTypId)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);
        }
    }
}